<?php

namespace Fang\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
*实体创建的权限表
*@ORM\Entity
*@ORM\Table(name="permission")
**/
class Permission
{
  /**
  *@ORM\Column(type="integer")
  *@ORM\Id
  *@ORM\GeneratedValue(strategy="AUTO")
  **/
  private $pid;
  /**
  *英文唯一名称
  *@ORM\Column(type="string", length=255, unique=true)
  **/
  private $name;
  /**
  *可读名称
  *@ORM\Column(type="string", length=255)
  **/
  private $readname;
  /**
  *权限类型，表示如何解析权限方式，比如路由名称，或者路径匹配等
  *@ORM\Column(type="string", length=255)
  **/
  private $ptype;
  /**
  *权限对应验证的数据
  *@ORM\Column(type="array")
  **/
  private $pdata;
  /**
  *@ORM\Column(type="integer")
  **/
  private $created;
  /**
  *@ORM\Column(type="integer")
  **/
  private $changed;

    /**
     * Get pid
     *
     * @return integer 
     */
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Permission
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set readname
     *
     * @param string $readname
     * @return Permission
     */
    public function setReadname($readname)
    {
        $this->readname = $readname;

        return $this;
    }

    /**
     * Get readname
     *
     * @return string 
     */
    public function getReadname()
    {
        return $this->readname;
    }

    /**
     * Set ptype
     *
     * @param string $ptype
     * @return Permission
     */
    public function setPtype($ptype)
    {
        $this->ptype = $ptype;

        return $this;
    }

    /**
     * Get ptype
     *
     * @return string 
     */
    public function getPtype()
    {
        return $this->ptype;
    }

    /**
     * Set pdata
     *
     * @param array $pdata
     * @return Permission
     */
    public function setPdata($pdata)
    {
        $this->pdata = $pdata;

        return $this;
    }

    /**
     * Get pdata
     *
     * @return array 
     */
    public function getPdata()
    {
        return $this->pdata;
    }

    /**
     * Set created
     *
     * @param integer $created
     * @return Permission
     */
    public function setCreated($created)
    {
        $this->created = $created;

        return $this;
    }

    /**
     * Get created
     *
     * @return integer 
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * Set changed
     *
     * @param integer $changed
     * @return Permission
     */
    public function setChanged($changed)
    {
        $this->changed = $changed;

        return $this;
    }

    /**
     * Get changed
     *
     * @return integer 
     */
    public function getChanged()
    {
        return $this->changed;
    }
}
